﻿<!DOCTYPE html>

<html lang="en">
<head>
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <!-- Title and other stuffs -->
    <title>@ViewBag.Title - Student</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="">
    
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/respond")

    <!-- Favicon -->
    <link rel="shortcut icon" href="img/favicon/favicon.png">
</head>
<body>
    <div class="navbar navbar-fixed-top bs-docs-nav" role="banner">
        <div class="conjtainer">

            <!-- Menu button for smallar screens -->
            <div class="navbar-header">
                <button class="navbar-toggle btn-navbar" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
                    <span>Menu</span>
                </button>
                <!-- Site name for smallar screens -->
                <a href="~/home" class="navbar-brand hidden-lg">OnlineTest</a>
            </div>

            <!-- Navigation starts -->
            <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
                <ul class="nav navbar-nav">
                    <!-- Logo section -->
                    <div class="col-md-4">
                        <!-- Logo. -->
                        <div class="logo">
                            <h1><a href="~/home">Online<span class="bold">Test</span></a></h1>
                        </div>
                        <!-- Logo ends -->
                    </div>
                </ul>

                <!-- Search form -->
                <form class="navbar-form navbar-left" role="search">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="Search">
                    </div>
                </form>
                <!-- Links -->

                <ul class="nav navbar-nav pull-right">
                    <li class="dropdown pull-right">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <i class="fa fa-user"></i>Hi, <span id="user"></span>  <label class="label label-success">Student</label> <b class="caret"></b>
                        </a>
                        <!-- Dropdown menu -->
                        <ul class="dropdown-menu">
                            <li><a href="~/Student/Account"><i class="fa fa-user"></i>Profile</a></li>
                            <li><a href="~/Student/ChangePassword"><i class="fa fa-key"></i>Change PassWord</a></li>
                            <li><a href="~/Student?lg=lg"><i class="fa fa-sign-out"></i>Logout</a></li>
                            
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </div>

    <!-- Header starts -->
    <header>
    </header>
    <!-- Header ends -->

    <!-- Main content starts -->
    <div class="content">

        <!-- Sidebar -->
        <div class="sidebar">
            <div class="sidebar-dropdown"><a href="#">Navigation</a></div>
            <!--- Sidebar navigation -->
            <!-- If the main navigation has sub navigation, then add the class "has_sub" to "li" of main navigation. -->
            <ul id="nav">
                <!-- Main menu with font awesome icon -->
                 
                <li id="liDashboard"><a href="~/Student/Home"><i class="fa fa-home"></i>Dashboard</a></li>
                <li id="liEditor"><a href="~/Cs/filter_html" target="_blank"><i class="fa fa-chevron-right"></i>Editor</a></li>
                <li id="liMyTest"><a href="~/Student/MyTest"><i class="fa fa-star-o"></i>My Test</a></li>
                <li id="liAvailable"><a href="~/Student/Available"><i class="fa fa-plus-circle"></i>Available</a></li>
                <li id="liAttempt"><a href="~/Student/Attempt"><i class="fa fa-magic"></i>Attempt</a></li>
            </ul>
        </div>

        <!-- Sidebar ends -->
        <!-- Main bar -->
        <div class="mainbar">

            <!-- Page heading -->
            <div class="page-head">
                <h2 id="h2Title" class="pull-left"></h2>
                <!-- Breadcrumb -->
                <div class="bread-crumb pull-right">
                    <a href="/Student"><i class="fa fa-home"></i>Home</a>
                    <!-- Divider -->
                    <span class="divider">/</span>
                    <a id="aTitle" href="javascript:void(0);" class="bread-current"></a>
                </div>
                <div class="clearfix"></div>
            </div>
            <!-- Page heading ends -->

            <!-- Matter -->
            <div class="matter">
                <div class="container">
                    @RenderBody()
                </div>
            </div>
            <!-- Matter ends -->

        </div>
        <!-- Mainbar ends -->
        
        <div class="clearfix"></div>
    </div>
    <!-- Content ends -->

    <!-- Footer starts -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <!-- Copyright info -->
                    <p class="copy">Copyright &copy; 2014-15 | <a href="#">Omy Infotech</a> </p>
                </div>
            </div>
        </div>
    </footer>
    <!-- Footer ends -->

    <!-- Scroll to top -->
    <span class="totop"><a href="#"><i class="fa fa-chevron-up"></i></a></span>

    @Scripts.Render("~/bundles/jquery.flot")
    @Scripts.Render("~/bundles/jquery.noty")
    @Scripts.Render("~/bundles/jquery.extra")
    @RenderSection("scripts", required: false)
     <div id="modalDiv" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog">
					  <div class="modal-content" id="modalContent">
                     
                    </div>
					</div>
					</div>
    
<div id="modalQsDiv" class="modal fade in" role="dialog" aria-labelledby="myModalLabel">
    <div id="CustomQuestion" class="modal-dialog"></div>
</div>

    <div id="ensTestModel" class="modal fade" style="width: 100%; margin-top: 1em">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                Are you sure want to <b>End Test?</b>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" id="btntestcancel">Cancel</button>
                <button type="button" id="btnTestFinish" class="btn btn-danger" data-dismiss="modal">Finish</button>
            </div>
        </div>
    </div>
</div>
   
</body>
</html>
<script type="text/javascript">
    /* Show Customize Error Msg  */
    function getCookie(cname) {
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1);
            if (c.indexOf(name) != -1) {
                return c.substring(name.length, c.length);
            }
        }
        return "";
    }
    $(document).ready(
        function () {
            debugger;
            var userName = getCookie("LoginSes");
            if (userName.length == 0 || userName == '') {
                window.location = "/Home";
            }
            else {
                $('#user').text(userName);
            }
            $("#btnTestFinish").click(function (e) {
                window.onbeforeunload = null;
                $('#alert_danger').children('.alert:first-child').remove();
                window.location = "./EndTest?AttemptID=" + getCookie("AttemptID");
              });
           
    });
    function showMsg(controlID, Message, TypeOfMsg, width) {
        width = typeof width !== 'undefined' ? width : '100%';
            switch (TypeOfMsg) {
                case 'info':
                    $('#' + controlID).css({ "width": width });
                    $('#' + controlID).html(Message);
                    $('#' + controlID).removeClass('alert alert-warning');
                    $('#' + controlID).removeClass('alert alert-success');
                    $('#' + controlID).removeClass('alert alert-danger');
                    $('#' + controlID).addClass('alert alert-info');
                    break;
                case 'warning':
                    $('#' + controlID).css({ "width": width });
                    $('#' + controlID).html(Message);
                    $('#' + controlID).removeClass('alert alert-info');
                    $('#' + controlID).removeClass('alert alert-success');
                    $('#' + controlID).removeClass('alert alert-danger');
                    $('#' + controlID).addClass('alert alert-warning');
                    break;
                case 'success':
                    $('#' + controlID).css({ "width": width });
                    $('#' + controlID).html(Message);
                    $('#' + controlID).removeClass('alert alert-info');
                    $('#' + controlID).removeClass('alert alert-warning');
                    $('#' + controlID).removeClass('alert alert-danger');
                    $('#' + controlID).addClass('alert alert-success');
                    break;
                case 'danger':
                    $('#' + controlID).css({ "width": width });
                    $('#' + controlID).html(Message);
                    $('#' + controlID).removeClass('alert alert-info');
                    $('#' + controlID).removeClass('alert alert-warning');
                    $('#' + controlID).removeClass('alert alert-success');
                    $('#' + controlID).addClass('alert alert-danger');
                    break;
                default:
                    $('#' + controlID).html('');
                    $('#' + controlID).removeClass();
            }
        }
 
</script>
